home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / CSR_EX.BAS < prev    next >
BASIC Source File  |  1988-09-17  |  647b  |  24 lines

  1. '
  2. ' *** CSR_EX.BAS - CSRLIN function programming example
  3. '
  4. ' Move cursor to center of screen, then print message.
  5. ' Cursor returned to center of screen.
  6.    LOCATE 12,40
  7.    CALL MsgNoMove("A message not to be missed.",9,35)
  8.    INPUT "Enter anything to end: ",A$
  9.  
  10. ' Print a message without disturbing current
  11. ' cursor position.
  12. SUB MsgNoMove (Msg$,Row%,Col%) STATIC
  13.  
  14.    ' Save the current line.
  15.    CurRow%=CSRLIN
  16.    ' Save the current column.
  17.    CurCol%=POS(0)
  18.    ' Print the message at the given position.
  19.    LOCATE Row%,Col% : PRINT Msg$;
  20.    ' Move the cursor back to original position.
  21.    LOCATE CurRow%, CurCol%
  22.  
  23. END SUB
  24.